refactor: modernize codebase with go fix - #790
Open
buchdag wants to merge 8 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes the Go codebase by applying automated go fix ./...-style refactors, primarily updating legacy interface{} usage to any and adopting newer standard-library APIs/patterns.
Changes:
- Replaced many
interface{}types withanyin template helpers and their tests. - Updated several implementations to use modern stdlib helpers/idioms (e.g.,
strings.Cut,rangeloops). - Refactored generator signal handling goroutine setup (currently introduces a compile error due to an invalid
sync.WaitGroupAPI call).
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/template/yaml.go | Switch YAML helper signatures from interface{} to any. |
| internal/template/yaml_test.go | Update test fixtures to use map[string]any / []any. |
| internal/template/where.go | Migrate where helpers to any; simplify label filtering loop. |
| internal/template/template.go | Update getArrayValues signature to any and pointer-kind check. |
| internal/template/template_test.go | Update test struct fields to any; remove redundant loop var rebinding. |
| internal/template/sort.go | Migrate sorting helpers and interfaces to any. |
| internal/template/sort_test.go | Update test function types/expected values to any. |
| internal/template/reflect.go | Migrate deep-get helpers to any. |
| internal/template/reflect_test.go | Update deep-get tests to use any. |
| internal/template/groupby.go | Migrate group-by helpers to any and update string-splitting iteration. |
| internal/template/functions.go | Migrate generic template functions (keys, contains, coalesce, when) to any. |
| internal/template/functions_test.go | Update nil-typed test variable to any. |
| internal/generator/generator.go | Refactor goroutine creation and notify output splitting; currently uses non-existent WaitGroup.Go. |
| internal/dockerclient/docker_cli.go | Simplify image parsing using strings.Cut. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR does a pass of
go fix ./...on the codebase.